package com.hkts.management.order.entity;


import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hkts.management.model.enums.OrderTypeEnum;
import com.hkts.management.mybaitsplus.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName(value = "hkts_order")


@ApiModel(value = "订单")
public class HktsOrder extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    private String id;
    /**
     * 货物信息id
     */
    @ApiModelProperty(value = "货物信息id")
    private String cargoId;
    /**
     * 司机userid
     */
    @ApiModelProperty(value = "司机userid")
    private String driverId;
    /**
     *
     */
    @ApiModelProperty(value = "货主id")
    private String shipper;
    /**
     * 订单状态
     */
    @ApiModelProperty(value = "订单状态")
    private OrderTypeEnum orderStatus;
    /**
     * 订单子状态
     */
    @ApiModelProperty(value = "订单子状态")
    private Integer orderSubstate;
    /**
     * 订单状态
     */
    @ApiModelProperty(value = "货主订单状态")
    private OrderTypeEnum shipperOrderStatus;
    /**
     * 订单子状态
     */
    @ApiModelProperty(value = "货主订单子状态")
    private Integer shipperOrderSubstate;
    /**
     * 运费支付单号
     */
    @ApiModelProperty(value = "运费支付单号")
    private String payTransport;
    /**
     * 运费支付支付状态
     */
    @ApiModelProperty(value = "运费支付支付状态")
    private Integer payTransportStatus;
    /**
     * 快递单号
     */
    private String courierCode;
    /**
     * 快递公司编号
     */
    private String courierCompanyCode;
    /**
     * 报名id
     */
    @ApiModelProperty(value = "报名id")
    private String applyId;

    /**
     * 快递公司
     */
    private String courierCompany;
    /**
     * 是否邮寄回单
     */
    @ApiModelProperty(value = "是否邮寄回单")
    private Integer isReceipt;
    /**
     * 公司code
     */
    @ApiModelProperty(value = "公司code")
    private String companyCode;

    /**
     * 确认收货人
     */
    @ApiModelProperty(value = "确认收货人")
    private String consignee;

    /**
     * 确认收货时间
     */
    @ApiModelProperty(value = "确认收货时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime receivingTime;

    /**
     * 实际重量
     */
    @ApiModelProperty(value = "实际重量")
    private BigDecimal actualWeight;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "运费支付时间")
    private LocalDateTime  freightPaymentTime;
    /**
     * 运费支付人
     */
    @ApiModelProperty(value = "运费支付人")
    private String freightPaymentUser;

    @ApiModelProperty(value = "运费支付人")
    private String startAddress;

    @ApiModelProperty(value = "运费支付人")
    private String endAddress;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "实际支付时间")
    private LocalDateTime actualPayTime;

    @ApiModelProperty(value = "是否指定")
    private Integer appoint;
    @ApiModelProperty(value = "取消说明")
    private String refundDescribe;
    @ApiModelProperty(value = "是否退款")
    private Integer isRefund;


}
